using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SajtLibrary.SajtClasses;

public partial class Public_WizardTest : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (SessionUtils.isCurrentUserAnnonimous())
        {
            WebSiteController.onUserIsNotLoggedIn();
            return;
        }
        Wizard1.ActiveStepIndex = 0;
        string productId = HttpContext.Current.Request.Params["productId"];
        
        if (productId == null)
        {
            // Server.Transfer("~/Public/PretragaProizvoda.aspx", false);
            WebSiteController.onUnknownProductId();
        }
        else
        {
            Product p = Product.loadProduct(Int64.Parse(productId));
            //Wizard1.WizardSteps[0]
            ((TextBox)Wizard1.FindControl("TextBox1")).Text = p.ProductName;
        }
    }
}
